﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MainFrameNoJs.Master"
    Inherits="System.Web.Mvc.ViewPage<GPMS.Model.ImportUser>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    导入用户
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        导入用户</h2>
    <%Html.EnableClientValidation(); %>
    <% using (Html.BeginForm("Import", "Administrator", null, FormMethod.Post,new { id="formimport"}))
       { %>
    <%: Html.ValidationSummary(true)%>
    <fieldset>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.SpecialtyID)%>
        </div>
        <div class="editor-field">
            <%: Html.DropDownListFor(model => model.SpecialtyID, new SelectList(Model.SpecialtyList as IEnumerable, "SpecialtyID", "SpecialtyName"))%>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.FileID)%>
        </div>
        <div class="editor-field">
            <%: Html.DropDownListFor(model => model.FileID, new SelectList(Model.FileList as IEnumerable, "FileID", "Name"))%>
        </div>
        <table id="importpermissionTable" class="dataTable">
            <tr>
                <th>
                    why missing?
                </th>
                <th>
                    是否拥有
                </th>
                <th>
                    角色名
                </th>
            </tr>
            <%foreach (var item in Model.RoleList)
              {%>
            <tr>
                <td>
                    why missing?
                </td>
                <td>
                    <%:Html.CheckBox(item.Role.RoleID.ToString(), item.Permission)%>
                </td>
                <td>
                    <%:item.Role.RoleName%>
                </td>
            </tr>
            <%} %>
        </table>
        <p>
            <input type="submit" value="导入" />
        </p>
    </fieldset>
    <% } %>
    <script type="text/javascript" src="<%: Url.Content("~/Scripts/MicrosoftMvcJQueryValidation.js") %>"></script>
    <script type="text/javascript">
        $(function () {
            tableToGrid("#importpermissionTable", { multiselect: false, scroll: true, width: 570, height: 370 });
            initForm($("#dialogPanel"), $("#formimport"), null, null, function () { $.unblockUI() });

        })
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Header" runat="server">
    <script type="text/javascript" src="<%: Url.Content("~/Scripts/jquery.form.js") %>"></script>
    <script type="text/javascript" src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>"></script>
</asp:Content>
